﻿
using System.Net;
using System.Text;
using XcoAppSpaces.Transport.Sockets.Auth;

#if NETFX_CORE
using IPAddress = Windows.Networking.HostName;
#endif


namespace AppSpaces.Transport.Sockets.Auth.Common
{
    public class ExpiringIPAddressEntry : ExpiringEntry<IPAddress>
    {}

    public class ListOfExpiringIPAddressEntries : ExpiringEntriesList<IPAddress>
    {
        public ListOfExpiringIPAddressEntries(int entrylifeTimeSeconds, int checkInterval)
            : base(entrylifeTimeSeconds, checkInterval)
        {
        }

        public new ExpiringIPAddressEntry GetOrAdd(IPAddress item)
        {
            return (ExpiringIPAddressEntry)base.GetOrAdd(item);
        }

		public void Remove(ExpiringIPAddressEntry entry)
		{
		    base.Remove(entry);
		}

        public new bool Contains(IPAddress item)
        {
            return base.Contains(item);
        }

        protected override ExpiringEntry<IPAddress> CreateInstance()
        {
            return new ExpiringIPAddressEntry();
        }
    }
}
